package com.peach.SSMDemo.controller;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.peach.SSMDemo.domain.FltRequest;
import com.peach.SSMDemo.service.FltService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * Created by tao on 2017/8/30.
 */
@Controller
@RequestMapping("/flt")
public class FltController {

    @Resource
    private FltService fltService;

    @RequestMapping(value = "/showFlt",method = RequestMethod.POST)
    @ResponseBody()
    public String getFltRecord(@RequestBody FltRequest fltRequest) throws JsonProcessingException {

        System.out.println(fltRequest.getStartDate()+ "---" + "---" +fltRequest.getEndDate());

        String fltRecordStr = this.fltService.getFltRecordService(fltRequest);
        System.out.println(fltRecordStr);
        return fltRecordStr;

    }

}
